<!--
 * @Descripttion: 库存查询列表
 * @version:
 * @Author: cxguo
 * @Date: 2019-08-02 15:03:05
 * @LastEditors: cxguo
 * @LastEditTime: 2020-11-07 13:56:21
 -->
<template>
  <div>
    <Tab
      v-model="tabIndex"
      :texts="['供应商','客户']"
      :is-show-date="false"
    />
    <component :is="currentTabName" oper="select" v-on="$listeners" />
  </div>
</template>
<script>
import Affix from '@/components/Affix'
import Tab from '@/views/components/Tab'
import CustomerList from '@/views/bsd/customer/list'
import SupplierList from '@/views/bsd/supplier/list'

export default {
  name: 'DailyList',
  filters: {
  },
  // eslint-disable-next-line vue/no-unused-components
  components: { Tab, Affix, CustomerList, SupplierList },
  props: {
    direction: {
      type: String,
      default: '0'
    }
  },
  data() {
    return {
      tabIndex: 0,
      insideDirection: '1'
    }
  },
  computed: {
    currentTabName: function() {
      if (this.tabIndex === 1) return 'CustomerList'
      return 'SupplierList'
    }
  },
  watch: {
  },
  created() {
    this.tabIndex = Number(this.direction)
  },
  methods: {
  }
}
</script>
